package ;

import henkolib.events.EventArgs;
import SampleEventClass;

/**
 * @author Henko
 */

class Main 
{	
	static function main() 
	{
		var sample = new SampleEventClass();
		
		sample.onSignal.Subscribe(function ()
		{
			trace("A Signal was received.");
		});
		
		sample.onSignal.Subscribe(function ()
		{
			trace("A Signal was received here too.");
		});
		
		sample.onLog.Subscribe(function (args:EventArgs<LogData>)
		{
			trace(Type.typeof(args.Sender) + " log: " + args.Data.Message);
		});
		
		sample.onData.Subscribe(function (args:EventArgs<Point>)
		{
			trace("A point data was received: " + args.Data.toString());
		});
		
		sample.RaiseSignal();
		sample.RaiseLog("Something has just happened.");
		sample.RaiseData(13, 42);
	}
	
}